package day0726;

import java.util.Arrays;
import java.util.Scanner;

public class Test6 {
    public static void main(String[] args) {
        double[]   score=new   double[10];
        inputElementMethod(score);
        System.out.println(Arrays.toString(score));
    }

    private static void inputElementMethod(double[]   score) {
        //循环输入10个成绩，  如果输入无效成绩用continue实现舍弃
        for(int i=0;  i<10   ;    ){
            Scanner s=new Scanner(System.in);
            double inputScore=s.nextDouble();
            if(inputScore<0  || inputScore>100){
                continue;
            }
            score[i]=inputScore;
            i++;
        }
        System.out.println(Arrays.toString(score));
    }
}
